<?php
function apply(){
?>
	<!--显示正在申请的用户-->
	<div class"apply">
		<div class="topic">正在申请的人：</div>
		<table>
			<tr>
				<td>姓名</td>
				<td>申请部门</td>
				<td>邮箱</td>
				<td>手机号码</td>
				<td colspan="2">操作</td>
			</tr>
	<?php
	$thisuserid=getdataallf('userid','userapply');
	if($thisuserid)
	{
		
		for($i=0;$i<count($thisuserid);$i++)
		{
			$user=getdataall('userapply','userid',$thisuserid[$i]);
			$username=$user['username'];
			$classid=$user['classid'];
			$email=$user['email'];
			$phone=$user['phone'];
			if($classid!=0)
			{
				$classname=getdataf('classname','class','classid',$classid);
				?>

			<tr>
				<td><?php echo $username; ?></td>
				<td><?php echo $classname; ?></td>
				<td><?php echo $email; ?></td>
				<td><?php echo $phone; ?></td>
				<td>
					<?php echo "<input type='button' class='button' value='审批' onclick=\"getcheck('".$thisuserid[$i]."',1)\"/>"; ?>
					<?php echo "<input type='button' class='button' value='拒绝' onclick=\"getcheck('".$thisuserid[$i]."',2)\"/>"; ?>
				</td>			
			</tr>
			<?php
			}
		}
	}
	else {
		echo "<tr><td>没有人</td></tr>";
	}
	?>
		</table>
	</div>
<?php
}
?>

